BigDFT.Interop.OpenMMInterop module

This module contains some wrappers for using OpenMM to perform various operations on BigDFT molecules.

http://docs.openmm.org/development/api-python/index.html

class OMMSystem(system=None, filename=None)[source]

Class of OpenMM binder system which enables functionalities of openMM on a BigDFT system

Parameters
  • system (System) – a instance of a system class

  • filename (str) – name of the PDB file to instantiate the system

set_forcefields(*ff_list)[source]

Define a set of force fields that will be used in the geometry ops.

Parameters

*ff_list – list of the force fields to be included, in priority order. Use the :func:py:`get_available_ff_names` to identify the available force fields

freeze_nonhydrogen_atoms()[source]

Lock the position of the elements which are not hydrogen.

omm_system(sys, ligand=None, *ff_list, **kwargs)[source]

Instantiate a omm system from a system and a force field.

Parameters

*ff_list – list of the force fields to be included, in priority order. Use the :func:py:`get_available_ff_names` to identify the available force fields.

Returns

Instance ready to be optimized.

Return type

OMMSystem

optimize_system(sys, outfile, *forcefields)[source]

Take a BigDFT system and optimize it according to a set of OMM FFs.

Parameters
  • sys (BigDFT.System) – the system to optimize.

  • outfile (str) – The file to write the optimized system to.

  • *forcefields – sequence of forcefields to be employed in the optimization.

Returns

meth:minimizeEnergy` method of OpenMM.

Return type

The objects returned by the `py

three_point_energies(sys, subs1, subs2, *forcefields)[source]

Calculate three_point_energies of two portion of a system. :param sys: the system to optimize. :type sys: BigDFT.System :param subs1: list of fragments composing subsystem 1 :type subs1: list :param subs2: list of fragments composing subsystem 2 :type subs2: list :param *forcefields: sequence of forcefields to be employed in the

optimization.

Returns

tuple of the three energies, eT, e1, e2.

Return type

collections.namedtuple

get_mutation_name(mut, offset=0)[source]

From a usual mutation notation AXXXB get the PDBfixer-compliant tuple.

Parameters
  • mut (str) – Mutation written in the AxxxB format.

  • offset (int) – offest to be applied to the xxx format.

Returns

the mutation name.

Return type

str

fixed_system(pH=None, mutations=[], system=None, filename=None, pdbid=None, select_chains=None, remove_extremal_missing_residues=True, custom_fixing_function=None, add_missing_residues=True, keepIds=False, convert_from_charmm_format=False, variants={}, **kwargs)[source]

Create a system with the pdbfixer tool.

Parameters
  • pH (float) – the pH of the environment. Add missing hydrogens according to this pH if provided.

  • mutations (list) – the mutation to be applied to the original structure. should be a list of two-element lists, the first being the list of mutations to be applied to the chain_id, provided by the second.

  • system (BigDFT.System) – the system to be fixed.

  • filename (str) – the PDB file from which the system has to be read. If system is provided, this arguments indicate the PDB file in which the system is written, prior to fixing. After fixing, such file may have to be overwritten.

  • pdbid (str) – the id of the PDB database.

  • select_chains (list) – if provided indicate the chains to be selected. Useful when pdbid is provided. All the chains will be included if omitted.

  • remove_extremal_missing_residues (bool) – if True only the internal missing residues are restored.

  • custom_fixing_function (func) – a function that has a BigDFT.System as an argument and returns the object to be provided.

  • add_missing_residues (bool) – include missing residues if true.

  • keepIds (bool) – If True, keep the residue and chain IDs specified in the Topology rather than generating new ones.

  • convert_from_charmm_format (bool) – Accept the PDB format which is usually provided as the output of charmm-gui. The chain id is provided as the last letter of each line.

  • variants (dict) – dictionary of chain_id,res_id: name of the variants which have to be imposed for the protonation state

Warning

(From OpenMM documentation) When keepIds=True, it is up to the caller to make sure these are valid IDs that satisfy the requirements of the PDB format. Otherwise, the output file will be invalid.

Returns

Fixed system, or returned object of

custom_fixing_function if present.

Return type

BigDFT.BioQM.BioSystem